package com.itwk.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itwk.common.utils.PageUtils;
import com.itwk.gulimall.product.entity.PmsAttrEntity;
import com.itwk.gulimall.product.entity.PmsAttrGroupEntity;
import com.itwk.gulimall.product.vo.AttrGroupRelation;
import com.itwk.gulimall.product.vo.AttrGroupWithAttrsVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author wangke
 * @email wangke19970512@163.com
 * @date 2021-01-07 22:57:11
 */
public interface PmsAttrGroupService extends IService<PmsAttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryCategoryPage(Map<String, Object> params, Long catId);

    PmsAttrGroupEntity getByIdWithCategory(Long attrGroupId);

    List<PmsAttrEntity> getAttrgoupRelation(Long attrgroupId); //获取关联关系

    void deleteRelation(AttrGroupRelation[] relations); //移除分组属性关联关系

    PageUtils getNoGroupAttr(Map<String, Object> params,Long attrGroupId); //获取还没有被关联的属性

    void saveRelation(AttrGroupRelation[] relation); // 保存关联关系

    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrs(Long catelogId);//用于查询发布商品时的所选分类下的属性组与组下关联的基本属性
}

